<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function person(name, age, sex) {
            this.name = name;
            this.age = age;
            this.sex = sex
        }
        person.prototype.run = function () {
            console.log("我们都是人");
        }
        function student(name, age, sex, study) {
            person.call(this,name,age,sex,study)
            this.study = study
        }
        student.prototype=new person
        student.prototype.constrictor=student
        const ming=new student('明',19,'男','英语')
        console.log(ming);
        ming.run()

    </script>
</body>

</html>